package com.hua.store.dao;

import com.hua.store.domin.OrderItem;
import com.hua.store.domin.Orders;
import com.hua.store.domin.PageModel;
import com.hua.store.domin.User;

import java.lang.reflect.InvocationTargetException;
import java.sql.SQLException;
import java.util.List;

public interface OrderDao {
    void saveOrder(Orders orders) throws Exception;

    void saveOrderItem(OrderItem orderItem) throws Exception;

    int findTotalRecordsByUid(User user) throws Exception;

    List<Orders> findOrdersByUidWithPage(User user, PageModel pm) throws Exception;

    Orders findOrderByOid(String oid) throws SQLException, InvocationTargetException, IllegalAccessException;

    void updateOrder(Orders orders) throws SQLException;

    List<Orders> findAllOrder() throws SQLException;

    List<Orders> findAllOrder(String state) throws SQLException;
}
